//
//  IMAudioPlayDelegate.h
//  YuanXinChat
//
//  Created by 晏德智 on 2017/8/30.
//  Copyright © 2017年 晏德智. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, LLSoundVolumeLevel) {
    kLLSoundVolumeLevelHigh = 13,
    kLLSoundVolumeLevelMiddle = 8,
    kLLSoundVolumeLevelLow = 3,
    kLLSoundVolumeLevelMute = 0
};

typedef NS_ENUM(NSInteger, LLErrorRecordType) {
    kLLErrorRecordTypeAuthorizationDenied,
    kLLErrorRecordTypeInitFailed,
    kLLErrorRecordTypeCreateAudioFileFailed,
    kLLErrorRecordTypeMultiRequest,
    kLLErrorRecordTypeRecordError,
};

typedef NS_ENUM(NSInteger, LLErrorPlayType) {
    kLLErrorPlayTypeInitFailed = 0,
    kLLErrorPlayTypeFileNotExist,
    kLLErrorPlayTypePlayError,
};

@protocol AudioPlayDelegate <NSObject>

@optional

- (void)audioPlayDidStarted:(id)userinfo;

//暂停播放
- (void)audioPlayDidPaused:(id)userinfo;

//恢复播放
- (void)audioPlayDidResumed:(id)userinfo;

//播放录音时，系统声音太小
- (void)audioPlayVolumeTooLow;

//发生播放错误时，播放Session同时结束
- (void)audioPlayDidFailed:(id)userinfo;

//播放结束时考虑到连续播放的需求，仅仅停止了当前播放，没有释放播放的session
- (void)audioPlayDidFinished:(id)userinfo;

//播放停止时考虑到连续播放的需求，仅仅停止了当前播放，没有
//停止播放session
- (void)audioPlayDidStopped:(id)userinfo;

//PCM
- (void)onHandlePCM:(id)userinfo;

@end
